public class GoodGroup {
    private String catory;
    private Goods[] member;

    public GoodGroup() {
    }

    public GoodGroup(String catory, Goods[] member) {
        this.catory = catory;
        this.member = member;
    }

    public String getCatory() {
        return catory;
    }

    public void setCatory(String catory) {
        this.catory = catory;
    }

    public Goods[] getMember() {
        return member;
    }

    public void setMember(Goods[] member) {
        this.member = member;
    }
    public void add(Goods goods){
        int i;
        for(i=0;i<member.length;i++)
            if(member[i]==null) {
                member[i] = goods;
                System.out.println("添加成功");
                break;
            }
        if(i==member.length)
            System.out.println("货架已满");
    }
}
